﻿<div class="page-header">
    <div class="row">
        <div class="col-md-8">
            <h2>{{ ::vm.translate.get('User List')}}</h2>
        </div>
        <div class="col-md-4 text-right">
        </div>
    </div>
</div>

<table class="table" st-pipe="vm.getUsers" st-table="vm.users">
    <thead>
        <tr>
            <th st-sort="Email" class="sortable">{{ ::vm.translate.get('Email')}}</th>
            <th st-sort="FullName" class="sortable">{{ ::vm.translate.get('FullName')}}</th>
            <th>Roles</th>
            <th st-sort="CreatedOn" class="sortable">{{ ::vm.translate.get('CreatedOn')}}</th>
            <th>Actions</th>
        </tr>
        <tr>
            <th>
                <div class="form-group">
                    <input class="form-control" st-search="Email"/>
                </div>
            </th>
            <th>
                <div class="form-group">
                    <input class="form-control" st-search="FullName"/>
                </div>
            </th>
            <th></th>
            <th><st-date-range predicate="CreatedOn" before="query.before" after="query.after"></st-date-range></th>
            <th></th>
        </tr>
    </thead>
    <tbody ng-show="!vm.isLoading">
        <tr ng-repeat="user in vm.users">
            <td>{{user.email}}</td>
            <td>{{user.fullName}}</td>
            <td>{{user.roles}}</td>
            <td>{{user.createdOn | date:'medium' }}</td>
            <td></td>
        </tr>
    </tbody>
    <tbody ng-show="vm.isLoading">
        <tr>
            <td colspan="5" class="text-center">Loading ... </td>
        </tr>
    </tbody>
    <tfoot>
        <tr>
            <td class="text-center" st-pagination="" st-items-by-page="50" st-displayed-pages="10" colspan="5"></td>
        </tr>
    </tfoot>
</table>	